package com.sunni.controller;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@RequestMapping("/target")
@Component("targetController")
public class TargetController {

    @RequestMapping("/show")
    public ModelAndView show(ModelAndView modelAndView){
        modelAndView.addObject("username","Sunni");
        modelAndView.setViewName("index");

        // 测试方法
        System.out.println("目标方法 running...");

        return modelAndView;
    }
}
